package gervosou;

import java.io.Serializable;
import java.util.Observable;

public class comptePerso 
	extends Observable        // pour MVC
	implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private int numero;
	private String type;
	private Float solde;
	private int decouvertAutorise;
	private clientPhysique leClient;

	public comptePerso(int n, String t, Float s, int d, clientPhysique c) {
		numero = n;
		type = t;
		solde = s;
		decouvertAutorise = d;
		this.lierClientPhysique(c);
	}

	private void lierClientPhysique(clientPhysique c) {
		leClient = c;
		c.rajoutCompte(this);
		
	}
	
	public clientPhysique leClient() {
		return(leClient);
	}

	public int getNumero() {
		return numero;
	}

	public String getType() {
		return type;
	}

	public Float getSolde() {
		return solde;
	}
	
	public int getDecouvertAutorise() {
		return decouvertAutorise;
	}

}
